package cn.sxt.clinic.controller;


import cn.sxt.clinic.pojo.Permission;
import cn.sxt.clinic.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2020-06-29
 */
@Controller
@RequestMapping("/permission")
public class PermissionController {

    @Autowired
    private IPermissionService permissionService;

    @RequestMapping("/getAllpermission")
    @ResponseBody
    public List<Permission> getAllpermission(){
        List<Permission> list = permissionService.list();
        return list;
    }

}

